#pragma once
#include <memory>
#include <nice2d/actions/finitetimeaction.h>

class MovementAction : public FiniteTimeAction
{
public:
    MovementAction(float duration = 3.0f);
    ~MovementAction();
public:
    void setTargetPosition(const sf::Vector2f &position, bool relativePosition = true);
    sf::Vector2f getTargetPosition()const;

    sf::Vector2f getOldPosition()const;
protected:
    void update(float deltaTime)override;
private:
    std::unique_ptr<class MovementActionData> data;
};
